package com.ruoyi.system.service.impl;

import com.ruoyi.system.domain.OrderLetter;
import com.ruoyi.system.mapper.OrderLetterMapper;
import com.ruoyi.system.service.IOrderLetterService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 订单站内信Service业务层处理
 *
 * @author hjf
 * @date 2025-08-04
 */
@Service
public class OrderLetterServiceImpl implements IOrderLetterService {
    @Autowired
    private OrderLetterMapper orderLetterMapper;

    /**
     * 查询订单站内信
     *
     * @param id 订单站内信主键
     * @return 订单站内信
     */
    @Override
    public OrderLetter selectOrderLetterById(Long id) {
        return orderLetterMapper.selectOrderLetterById(id);
    }

    /**
     * 查询订单站内信列表
     *
     * @param orderLetter 订单站内信
     * @return 订单站内信
     */
    @Override
    public List<OrderLetter> selectOrderLetterList(OrderLetter orderLetter) {
        return orderLetterMapper.selectOrderLetterList(orderLetter);
    }

    /**
     * 新增订单站内信
     *
     * @param orderLetter 订单站内信
     * @return 结果
     */
    @Override
    public int insertOrderLetter(OrderLetter orderLetter) {
        return orderLetterMapper.insertOrderLetter(orderLetter);
    }

    /**
     * 修改订单站内信
     *
     * @param orderLetter 订单站内信
     * @return 结果
     */
    @Override
    public int updateOrderLetter(OrderLetter orderLetter) {
        return orderLetterMapper.updateOrderLetter(orderLetter);
    }

    /**
     * 批量删除订单站内信
     *
     * @param ids 需要删除的订单站内信主键
     * @return 结果
     */
    @Override
    public int deleteOrderLetterByIds(Long[] ids) {
        return orderLetterMapper.deleteOrderLetterByIds(ids);
    }

    /**
     * 删除订单站内信信息
     *
     * @param id 订单站内信主键
     * @return 结果
     */
    @Override
    public int deleteOrderLetterById(Long id) {
        return orderLetterMapper.deleteOrderLetterById(id);
    }
}
